<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
    <h2>首页</h2>
    <hr>
    {% if user %}
        <h3>欢迎您!!：<span style="color: blue;">{{ user.username }}</span></h3>
        <a href="{% url 'logout' %}">注销</a>
    {% else %}
        <p>您尚未登录。</p>
        <a href="{% url 'login' %}">登录</a> | <a href="{% url 'register' %}">注册</a>
    {% endif %}
</body>
</html>